package com.ruoyi.system.Control;

import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import org.springframework.http.MediaType;

import java.io.IOException;

public class DataShareControl {
    public static void main(String[] args) throws IOException {
        System.out.println("sdfsdfsdfsdfsdf");

        // 创建OkHttpClient实例
        OkHttpClient client = new OkHttpClient();

        // 创建Request对象
        Request request = new Request.Builder()
                .url("www.baidu.com").build();

        try {
            // 发送请求并获取响应
            Response response = client.newCall(request).execute();

            // 输出响应内容
            System.out.println(response.body().string());
        } catch (Exception e) {
            e.printStackTrace();
        }

    }

}
